import Vue from 'vue'
import VueRouter from 'vue-router'
// 引入推荐音乐
import Recommend from '../views/Recommend.vue'
// 引入热歌排行榜
import Rank_link from '../views/Rank_list.vue'
// 引入搜索页面
import Search from '../views/Search.vue'
//引入推荐内页面
import Profile from '../views/Profile.vue'
Vue.use(VueRouter)

const routes = [
    {
        // 推荐音乐
        path: '/',
        name: "recommend",
        component: Recommend
    },
    //推荐内页面
    {
        path: "/profile",
        component: Profile
    },
    {
        // 热歌排行榜
        path: '/rank_list',
        name: "rank_list",
        component: Rank_link
    },
    {
        // 搜索页面
        path: '/search',
        name: "search",
        component: Search
    },
    {
        // 播放页面
        path: '/item',
        name: "item",
        component: () => import('../components/item')
    }
]

const router = new VueRouter({
    routes
})

export default router